<?php
/*
设置自身在线状态，并获取好友状态页面
*/


include '../include/init.php';


$uid=$_POST['u'];
$usrstatus=$_POST['us'];
$fs=trim($_POST['fs']);
$usr=new userModel();


$last=trim($_POST['last']);
if($last!=''&&$last!='undefined')
{
	$rc=new recentcontactModel();
	$rc->set($uid,$last);
}


$usr->changeStatus($uid,$usrstatus,30);

if($fs=="")
{
	die(json_encode(false));
}

$frd_arr=explode(',',$fs);

$allstatus=$usr->getAllstatusbyid($frd_arr);

if(!empty($allstatus))
{
	die(json_encode($allstatus));
}
else
{
	die(json_encode(false));
}
